<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo isset($admin_title)?$admin_title:"";?>-<?php echo isset($site_name)?$site_name:"";?></title>
<meta name="author" content="designer:webzhu, date:2012-03-23" />
<link type="image/x-icon" href="<?php echo urldecode(Url::urlFormat("@favicon.ico"));?>" rel="icon">
<link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("@static/css/base.css"));?>" />
<link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("@static/css/admin.css"));?>" />
<link rel="stylesheet" type="text/css" href="<?php echo urldecode(Url::urlFormat("@static/css/font_icon.css"));?>" />
<?php echo JS::import('jquery');?>
<script type="text/javascript" src="<?php echo urldecode(Url::urlFormat("@static/js/common.js"));?>"></script>
<!--[if lte IE 7]><script src="<?php echo urldecode(Url::urlFormat("@static/css/fonts/lte-ie7.js"));?>"></script><![endif]-->
</head>
<body >
<div id="header">
	<div class="nav_sub">
			    	您好[<?php echo isset($manager['name'])?$manager['name']:"";?>]&nbsp; | <a href="<?php echo urldecode(Url::urlFormat("/simple/login"));?>" target="_blank">返回前台</a> | <a href="<?php echo urldecode(Url::urlFormat("/admin/logout"));?>">退出</a>&nbsp; | &nbsp; <a id="btn_clear" href="javascript:;">清理缓存</a>
	</div>
    <div id="Logo"><a href=""><img src="<?php echo urldecode(Url::urlFormat("@static/images/logo_min.png"));?>"></a></div>
	<ul id="main_nav" class="clearfix">
	<?php foreach($mainMenu as $key => $item){?>
		<li <?php if($key==$menu_index['menu']){?>class="active"<?php }?>><a href="<?php echo urldecode(Url::urlFormat("$item[link]"));?>"  ><?php echo isset($item['name'])?$item['name']:"";?></a></li>
	<?php }?>
	</ul>
</div>
<div id="mainContent">
	<div id="sidebar" >
		<ul class="menu" style="margin-top:15px;">
		<?php foreach($subMenu as $key => $item){?>
			<li class="submenu">
			<ul><li class="sub-index"><b><a href="javascript:;"><?php echo isset($item['name'])?$item['name']:"";?></a></b></li>
			<?php foreach($menu->getNodes($item['link']) as $key => $item){?>
			<?php if(substr($item['link'],-5)!='_edit' && !$item['hidden'] ){?>
				<li><a href='<?php echo urldecode(Url::urlFormat("$item[link]"));?>' <?php if($item['link']==$nav_link){?>class="current"<?php }?> ><?php echo isset($item['name'])?$item['name']:"";?></a></li>
				<?php }?>
			<?php }?>
			</ul>
			</li>
		<?php }?>
		</ul>
	</div>
	<div id="content" >

		<?php if(!isset($msg)){?><?php $msg=Req::post('msg');?><?php }?>
		<?php if(!isset($validator)){?><?php $validator=Req::post('validator');?><?php }?>
		<?php if(isset($msg[0])){?>
		<div id="message-bar" class="message_<?php echo isset($msg[0])?$msg[0]:"";?>"><?php echo isset($msg[1])?$msg[1]:"";?></div>
		<?php }elseif(isset($validator)){?>
		<div class="message_warning"><?php echo isset($validator['msg'])?$validator['msg']:"";?></div>
		<?php }?>
		<?php echo JS::import('dialog?skin=brief');?>
<?php echo JS::import('dialogtools');?>
<form action="" method="post">
<div class="tools_bar clearfix">
    <a class="icon-delicious" href="<?php echo urldecode(Url::urlFormat("/order/hebing_order_list"));?>"> 全部订单</a>
    <a class="icon-eye-blocked" href="<?php echo urldecode(Url::urlFormat("/order/hebing_order_list/status/1"));?>"> 未付款</a>
    <a class="icon-cogs" href="<?php echo urldecode(Url::urlFormat("/order/hebing_order_list/status/2"));?>"> 已付款</a>
    <span class="fr"><a class="btn" href="javascript:;" id="btnSearch">查询</a></span>
    <span class="fr"><input type="text" placeholder="请输入合并订单号" id="txtHbOrderNo"/></span>
    
<!-- 
    <span class="fr"><a href='javascript:;' id="condition" class="icon-search" style="" > 筛选条件</a><input id="condition_input" type="hidden" name="condition" value="<?php echo isset($condition)?$condition:"";?>"></span>
     -->
</div>
<table class="default" >
    <tr>
        <th style="width:60px">操作</th>
        <th style="width:100px">会员账号</th>
        <th style="width:150px">合并订单号</th>
        <th style="width:200px">所属子订单</th>
        <th style="width:60px">商品总额(￥)</th>
        <th style="width:100px">订单状态</th>
        <!-- 
        <th style="width:60px"><?php echo isset($k_cb)?$k_cb:"";?> </th>
        <th style="width:70px">会员账号</th>
        <th style="width:60px">物流类型</th>
        <th style="width:70px">收货人</th>
        <th style="width:80px">收货人电话</th>
        <th style="width:80px">支付方式</th>
        
        <th style="width:50px">支付状态</th>
         
        <th style="width:50px">配送状态</th>
        <th style="width:50px">订单状态</th>
        <th style="width: 60px">打印</th>
         -->  
    </tr>
    
     <?php $item=null; $obj = new Query("demo_order");$obj->where = "$where";$obj->page = "1";$obj->order = "id desc";$items = $obj->find(); foreach($items as $key => $item){?>
        <tr>
            <td style="width:70px" class="btn_min"><div class="operat hidden"><a  class="icon-cog action" href="javascript:;"> 处理</a><div class="menu_select"><ul>
                <li>
                	<!-- 
                	<a class="icon-close" href="javascript:confirm_action('<?php echo urldecode(Url::urlFormat("/order/hebing_order_del/id/$item[id]"));?>')"> 删除</a>
                	 -->
                </li>
               <td>
            	<?php echo Common::getUserInfoByUId($item['user_id'])['name'];?>
            </td>
            <td style="width:110px"><?php echo isset($item['order_no'])?$item['order_no']:"";?></td>
            
            <td style="width:120px">
            
            <?php $child_order_str=explode(',',$item['child_order_no']);?>
            <?php foreach($child_order_str as $key => $demo){?>
            <?php $v=Common::getOrderInfoByONo($demo);?>
            	<?php echo isset($demo)?$demo:"";?> &nbsp;<a href="javascript:;" onclick="view(<?php echo isset($v[id])?$v[id]:"";?>)">查看</a>
            	<br>
            <?php }?>
            </td>
            
            <td style="width:60px"><?php echo isset($item['order_amount'])?$item['order_amount']:"";?></td>
            
            <td>
            	<?php if($item['status'] == 0){?>
            		<b class='red'>未付款</b>
            	<?php }else{?>
            		<b class='green'>已付款</b>
            	<?php }?>
            </td>
            
        </tr>
    <?php }?>
</table>
</form>
<div class="page_nav">
<?php echo $obj->pageBar();?>
</div>
<div id="status_dialog" style="display: none; position: relative;" class="form2">
    <h3 id="order_title">备注信息：</h3>
        <input type="hidden" name="id" id="order_id" value="">
        <input type="hidden" name="status" id="order_status" value="">
        <input type="hidden" name="op" id="order_op" value="">
        <textarea id="order_remark" name="remark"></textarea>
    <div class="tc"><button class="focus_button" onclick="submit_status()">保存</button></div>
</div>
<script type="text/javascript">
$("#btnSearch").click(function(){
	var hbOrderNo=$("#txtHbOrderNo").val();
	//var url="http://localhost/qcshop/index.php?con=order&act=hebing_order_list&hbOrderNo="+hbOrderNo;
	var url="<?php echo urldecode(Url::urlFormat("/order/hebing_order_list"));?>&hbOrderNo="+hbOrderNo;
	//"http://qcjn99.com/index.php?con=order&act=hebing_order_list&hbOrderNo="+hbOrderNo;
	if(hbOrderNo =="" || hbOrderNo == null)
	{
		//url = "http://localhost/qcshop/index.php?con=order&act=hebing_order_list";
		var url="<?php echo urldecode(Url::urlFormat("/order/hebing_order_list"));?>";
	}
	
	document.location.href = url;
});

function view(id){
    art.dialog.open("<?php echo urldecode(Url::urlFormat("/order/order_view/id/"));?>"+id,{id:'view_dialog',title:'查看订单',resize:false,width:900,height:450});
}
</script>
	</div>
</div>
<script type="text/javascript">
	$(function () {
		if('<?php echo Req::args("con");?>'=='admin'){
			$(".submenu .current").parent().parent().parent().addClass('current');
		}else{
			$(".submenu").addClass('current');
		}
		$(".submenu .sub-index").on("click",function(){
			$(this).parent().parent().toggleClass('current');
		})
	})

</script>
</body>
</html>
<script>
	$("#btn_clear").on("click",function(){
		$.post("<?php echo urldecode(Url::urlFormat("/admin/clear_act"));?>",function(data){
			art.dialog.tips("<p class='"+data['status']+"'>"+data['msg']+"</p>");
		},'json');
	});
</script>
<!--Powered by TinyRise-->